﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dominio.Core.Business.Repository;
using Core.Infra.Repository;
using NHibernate;
using Core.Infra.Web;
using Core.Business.Domain.Repository;

namespace Core.Infra.Factories {
    public class RepositoryFactory {

        public static IRepository<T> GetRepository<T>(ISession session) where T : class{

            return new Repository<T>(session);            
        }

        public static IContaRepository GetContaRepository(ISession session) {

            return new ContaRepository(session);
        }

        public static IContaRepository GetContaRepository() {

            return new ContaRepository(SessionFactory.Create().GetCurrentSession());
        }
    }
}
